package com.kcwl.idea.plugins.tool.config;

import javax.swing.*;


public class KcCryptSettingsForm {
    private JPanel panel;
    private JTabbedPane tabbedPane;

    //生产环境配置
    private JTextField mobileKeyProField;
    private JTextField idCardKeyProField;

    //测试环境配置
    private JTextField idCardKeyTestField;
    private JTextField mobileKeyTestField;

    public JPanel getPanel() {
        return panel;
    }

    public KcCryptSettings get() {
        KcCryptSettings data = new KcCryptSettings();
        data.setMobileKeyPro(mobileKeyProField.getText().trim());
        data.setIdCardKeyPro(idCardKeyProField.getText().trim());
        data.setMobileKeyTest(mobileKeyTestField.getText().trim());
        data.setIdCardKeyTest(idCardKeyTestField.getText().trim());
        return data;
    }


    public void set(KcCryptSettings data) {
        mobileKeyProField.setText(data.getMobileKeyPro());
        idCardKeyProField.setText(data.getIdCardKeyPro());
        mobileKeyTestField.setText(data.getMobileKeyTest());
        idCardKeyTestField.setText(data.getIdCardKeyTest());
    }
}
